before he was slammed into by a police car , mario valencia fired a rifle with a loosened lock .
he shoplifted the gun and ammo from a walmart , where a saleswoman who showed him the weapon alerted security .
walmart says the lock was properly installed but police say it was loose when it was found .